package com.zhen.aikan.vo;

import com.zhen.aikan.constant.ResultConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author LiJiaZhen
 * @date 2023/11/6 16:05
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "DanmuResult对象", description = "返回弹幕数据模板")
public class DanmuResult {
    @ApiModelProperty("状态码")
    private Integer code;
    @ApiModelProperty("数据")
    private Object data;

    private String msg;

    public static DanmuResult ok(Object data) {
        return new DanmuResult(0, data,"");
    }
    public static DanmuResult fail(String msg) {
        return new DanmuResult(201,null,msg);
    }
}
